package flex.cc.uac.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import flex.cc.base.dto.LoginAuthDto;
import flex.cc.uac.dto.token.TokenMainQueryDto;
import flex.cc.uac.entity.UacUserTokenEntity;

import javax.servlet.http.HttpServletRequest;

/**
 * 用户Token统计表
 *
 * @author zhangzk
 * @email zhangzhikai@sinosoft.com.cn
 * @date 2020-06-22 00:27:10
 */
public interface UacUserTokenService extends IService<UacUserTokenEntity> {

    /**
     * 保存token.
     *
     * @param accessToken  the access token
     * @param refreshToken the refresh token
     * @param loginAuthDto the login auth dto
     * @param request      the request
     */
    void saveUserToken(String accessToken, String refreshToken, LoginAuthDto loginAuthDto, HttpServletRequest request);

    IPage<UacUserTokenEntity> listTokenWithPage(TokenMainQueryDto token);

}

